<template>
    <div class="Homes">
        <div>
            <ul>
                <li>Peachphoto</li>
                <li>Let's Peachphoto</li>
                <li><button @click="Gologin">Join Us</button></li>
            </ul>
        </div>
    </div>
</template>

<script>
export default {
    methods: {
        Gologin() {
            const loading = this.$loading({
                lock: true,
                text: 'Loading',
                spinner: 'el-icon-loading',
                background: 'rgba(0, 0, 0, 0.7)',
                target: document.querySelector('.Homes')//loadin覆盖的dom元素节点
            });
            setTimeout(() => {
                loading.close();
                this.$router.push('/HelloWorld')
            }, 800);
        }
    }
}
</script>

<style scoped>
* {
    margin: 0;
    padding: 0;
    list-style: none;
}

.Homes {
    background-image: url(../assets//Homebg.jpg);
    background-repeat: no-repeat;
    background-size: 100%;
    position: absolute;
    height: 100%;
    width: 100%;
    top: 0;
    left: 0;
}

ul {
    margin: 120px;
}

li {
    font-size: 60px;
    font-weight: bold;
    text-align: left;
    padding: 15px 0;
}

li:nth-of-type(2) {
    color: #F56C6C;
}

button {
    border: none;
    font-size: 35px;
    border-radius: 10px;
    padding: 5px 25px;
    background-color: #2c3e50d7;
    color: white;
    cursor: pointer;
    transition: 1.7s;
}

button:hover {
    transition: 1.7s;
    background-color: white;
    color: #2c3e50d7;
}
</style>